dragon_warrior_monsters_2_moddingfandomcom-20200215-history
Recruitment
Went through the recruitment code and figured out how everything works essentially. First off, there's two different recruit rates for monsters: one for the unique/prebuilt monster and another for the species itself (only used if you don't have the monster already). Both are on a 0-7 scale with 0 guaranteeing success and 7 forcing a failure under normal circumstances. There's also an important value for determining your success later on (if other checks don't cause you to succeed earlier), the meat/taming modifier. This value starts at 10 (the amount a single jerky would give) and increases using the following table based on the meat you give the monsters (NOTE: There is a cap of 1800 for this value, so two sirloins max your chances): * BeefJerky = 10 * PorkChop = 30 * Rib = 100 * Sirloin = 999 (255 in data, likely hardcoded to this elsewhere) * BadMeat = 5 + poison (not useful for taming) * MeteOrb = 255 (guarantees join, actual taming value likely ignored) The code first checks a few unknowns (which I'll need to find out eventually; likely involve random key worlds), that force a failure depending on their value: one fails if the value isn't 0, and the other fails if it's 3, 4, 5, or 8. After this it checks to see if you already have this species of monster (not sure if it's just currently owned or if you've ever had it, though guessing the latter) and changes the way the remaining code is calculated based on the result. Species not owned: : Species join rate is checked, and if it's 7 then the recruitment fails. Next it loads values based on the species join rate from the following table and checks against a random from 0 to 199 to determine if it skips the meat/unique join rates and causes a success (format is: rate = value (actual chance)): :* 0 = 100 (50%) :* 1 = 50 (25%) :* 2 = 24 (12%) :* 3 = 10 (5%) :* 4 = 6 (3%) :* 5 = 2 (1%) :* 6 = 1 (0.5%) :* 7 = 0 (not used/0%) : MeteOrb usage is checked here (would have made more sense to do it earlier, especially since it's technically checked a second time later) and guarantees a recruitment success if used. Next comes the unique/prebuilt join rate's effects on the meat/taming mod, which then continues on to the final shared calculations: :* 0 = Success :* 1 = Tame Mod * 5 (base 41% success) :* 2 = Tame Mod * 2 (base 11% success) :* 3 = Tame Mod (base 1% success) :* 4 = Tame Mod / 2 (the rest need meat to have a chance) :* 5 = Tame Mod / 5 :* 6 = Tame Mod / 16 :* 7 = Fail Species owned: : MeteOrb usage checked here (the second check for species not owned), followed by the unique/prebuilt join rate effects which differ a bit from the above section, and finally to the shared ending code: :* 0 = Success :* 1 = Tame Mod (base 1% success) :* 2 = Tame Mod / 4 (the rest need meat to have a chance) :* 3 = Tame Mod / 8 (these three use identical code) :* 4 = Tame Mod / 8 :* 5 = Tame Mod / 8 :* 6 = Tame Mod / 20 :* 7 = Fail Final calculations: : The game generates a random between 10 and 100 and then subtracts this value from the meat/taming mod to get the chance to continue. If this value ends up negative after the subtraction, you fail to recruit. Finally, the game generates another random between 1 to 100, and gives you success if it's less than 91. This means a 90% chance to succeed and a 10% chance to fail when the previous check passes, so you can never guarantee a recruitment without MeteOrb for non-zero rate monsters. To give you an idea of what kind of meat quantities you need, here's some meat quantities for min (1%) and max (90%, if available) success rate for each table, including quantities that you can't get due to inventory space (J = BeefJerky, P = PorkChop, R = Rib, S = Sirloin): : Species not owned: :* 1 = 41% min; J for 90% :* 2 = 11% min; J*4 or J+P for 90% :* 3 = 1% min; J*9, P*3, or R for 90% :* 4 = J for 1%; J*19, J+P*6, P*3+R, or R*2 for 90% :* 5 = J*4, J+P, or R/S for 1%; J*49, J+P*16, P*3+R*4, R*5, or S (overkill) for 90% :* 6 = J*15, P*5, or J*2+P+R for 1%; J*159, P*53, P*3+R*15, R*6+S, or S*2 for 90% :* Rib * 2 guarantees 1%+, and Sirloin * 2 guarantees 90% for all : Species owned: :* 1 = 1% min; J*9, P*3, or R for 90% :* 2 = J*3 or P for 1%; J*39, P*13, P*3+R*3, R*4, or S (overkill) for 90% :* 3-5 = J*7 or J+P*2 for 1%; J*79, J+P*26, P*3+R*7, R*8, or S for 90% :* 6 = J*19, J+P*6 or P*3+R for 1%; J*179, J*2+P*59, P*3+R*17, R*18, or S*2 for 80% :* Rib * 2 guarantees 1%+, Sirloin * 2 guarantees 90% for 1-5, and 80% for 6 (1800 cap; needs 2000) Side note: if a monster has a Species rate of 7, but a Unique rate that isn't 7, you can capture them normally IF you already have them. If you don't have them, they will remain unable to be recruited until you obtain them some other way. Not sure if any monsters have this trait, but it is a possibility. Category:Monster Data